#ifndef MAP_H
#define MAP_H

#include <QWidget>
#include <QMouseEvent>
#include <QMessageBox>


enum Flag{
    startingPoint,endPoint,roadBlock,null
};

class Map : public QWidget
{
    Q_OBJECT
public:
    explicit Map(QWidget *parent = nullptr);
    QVector<QVector<Flag>> data;
    QPoint start;

private:
    int column;
    int row;


    QPoint end;

signals:
    void closeWid();

public slots:
    void changeSize(const int& r,const int& c);
    void changeRoad(const int& i,const int& j , int& k);

protected:
    void paintEvent(QPaintEvent *event) override;
    void mousePressEvent(QMouseEvent *event) override;

};

#endif // MAP_H
